CMAKE_MINIMUM_REQUIRED(VERSION 3.10)
project(base) 
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(${PROJECT_SOURCE_DIR}/source)
include_directories(../../../devenv/LuaJIT/src)
include_directories(../../../devenv/LuaBridge/Source/LuaBridge)
link_directories(${PROJECT_SOURCE_DIR}/lib)
# link_directories(${PROJECT_SOURCE_DIR}/../../../devenv/lib)

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
  set(SI_CFLAGS "-g3 -O0 -Wall -fPIC -DOS_LINUX -std=gnu++11 -D_DEBUG -DCHECK_MEM_LEAK")
  set(OUTPUT_SUFFIX "d")
elseif(CMAKE_BUILD_TYPE STREQUAL "")
  set(SI_CFLAGS "-g3 -O0 -Wall -fPIC -DOS_LINUX -std=gnu++11 -D_DEBUG -DCHECK_MEM_LEAK")
  set(OUTPUT_SUFFIX "d")
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
  set(SI_CFLAGS "-g3 -O2 -Wall -fPIC -DNDEBUG -DOS_LINUX -std=gnu++11")
endif(CMAKE_BUILD_TYPE STREQUAL "Debug")

add_subdirectory(source)

set(CMAKE_CXX_FLAGS ${SI_CFLAGS} CACHE INTERNAL "global cxx flags")
set(CMAKE_C_FLAGS ${SI_CFLAGS} CACHE INTERNAL "global c flags")

